// amplitude related channel statistics - adcs and qdcs
void a(vector<TH1 *> &v, TObject *h){ v.push_back((TH1F *)h); }
void amp(){
  TFile *f = new TFile(getenv("TMP1"));
  TDirectory *fDaq = (TDirectory *)f->Get("UnpackTask/daq");
  vector<TH1 *> v;

  a(v, fDaq->Get("haCh"));
  a(v, fDaq->Get("ha"));
  a(v, fDaq->Get("hac"));
  a(v, fDaq->Get("hqdc"));

  TCanvas *c = new TCanvas("c", "Amplitude related info - ADCs and QDCs", 1600, 900);
  c->Divide(2, 2);
  for(int i = 0; i < 4; i++){
    c->cd(i+1);
    if(v[i]) v[i]->Draw("colz");
  } // end for over i
} // end function amp
